<div class="bjui-pageContent">
    <form action="{{url('admin/user/add')}}" id="user_edit" data-toggle="validate" data-alertmsg="false">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <table class="table table-bordered">
            <tbody>
            <tr>
                <td class="col-sm-2 right">
                    <label for="name">姓名：</label>
                </td>
                <td>
                    <input name="name" id="name" type="text" data-rule="required" size="15">
                </td>
            </tr>
            <tr>
                <td class="col-sm-2 right">
                    <label for="gender">性别：</label>
                </td>
                <td>
                    <select name="gender" id="gender" data-toggle="selectpicker" data-rule="required">
                        @foreach($genders as $key => $name)
                            <option value="{{$key}}">{{$name}}</option>
                        @endforeach
                    </select>
                </td>
            </tr>
            <tr>
                <td class="col-sm-2 right">
                    <label for="email">邮箱：</label>
                </td>
                <td>
                    <input name="email" id="email" type="email" data-rule="required email" size="25">
                </td>
            </tr>
            <tr>
                <td class="col-sm-2 right">
                    <label for="phone">手机号码：</label>
                </td>
                <td>
                    <input name="phone" id="phone" type="text" data-rule="mobile" size="25">
                </td>
            </tr>
            <tr>
                <td class="col-sm-2 right">
                    <label for="address">地址：</label>
                </td>
                <td>
                    <input name="address" id="address" type="text" size="35">
                </td>
            </tr>
            <tr>
                <td class="col-sm-2 right">
                    <label for="role_id">角色：</label>
                </td>
                <td>
                    <select name="role_id" id="role_id" data-toggle="selectpicker" data-rule="required">
                        @foreach($roles as $role)
                            <option value="{{$role->id}}">{{$role->name}}</option>
                        @endforeach
                    </select>
                </td>
            </tr>
            <tr>
                <td class="col-sm-2 right">
                    <label for="password">密码：</label>
                </td>
                <td>
                    <input name="password" id="password" type="password" data-rule="required" size="15">
                </td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li>
            <button type="button" class="btn-close" data-icon="close">取消</button>
        </li>
        <li>
            <button type="submit" class="btn-default" data-icon="save">保存</button>
        </li>
    </ul>
</div>